Share via


CorsPolicy Class

 

Defines the policy for Cross-Origin requests based on the CORS specifications.

Namespace:   System.Web.Cors
Assembly:  System.Web.Cors (in System.Web.Cors.dll)

Inheritance Hierarchy

System.Object
  System.Web.Cors.CorsPolicy

Syntax

public class CorsPolicy
public ref class CorsPolicy 
type CorsPolicy = class end
Public Class CorsPolicy

Constructors

Name Description
System_CAPS_pubmethod CorsPolicy()

Initializes a new instance of the CorsPolicy class.

Properties

Name Description
System_CAPS_pubproperty AllowAnyHeader

Gets or sets a value indicating whether to allow all headers.

System_CAPS_pubproperty AllowAnyMethod

Gets or sets a value indicating whether to allow all methods.

System_CAPS_pubproperty AllowAnyOrigin

Gets or sets a value indicating whether to allow all origins.

System_CAPS_pubproperty ExposedHeaders

Gets the headers that the resource might use and can be exposed.

System_CAPS_pubproperty Headers

Gets the headers that are supported by the resource.

System_CAPS_pubproperty Methods

Gets the methods that are supported by the resource.

System_CAPS_pubproperty Origins

Gets the origins that are allowed to access the resource.

System_CAPS_pubproperty PreflightMaxAge

Gets or sets the number of seconds the results of a preflight request can be cached.

System_CAPS_pubproperty SupportsCredentials

Gets or sets a value indicating whether the resource supports user credentials in the request.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

Returns a String that represents this instance.(Overrides Object.ToString().)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Web.Cors Namespace

Return to top